
package com.amigo.online.common.param.result.merchant;
/**
<code>GoodsCommentInfo.java</code>
<p>

</p>
<p>
	@company Amigo
	@author LuChen
	@time 2018年12月18日 下午1:46:18
	@version 1.0 
	@lastUpdate 无
</p>
*/

import java.util.List;

public class GoodsCommentInfo {
	
	private Integer goodCommentCount;
	
	private Integer badCommentCount;
	
	private Integer allCommentCount;
	
	private List<MerchantCommentInfo> list;

	public Integer getGoodCommentCount() {
		return goodCommentCount;
	}

	public void setGoodCommentCount(Integer goodCommentCount) {
		this.goodCommentCount = goodCommentCount;
	}

	public Integer getBadCommentCount() {
		return badCommentCount;
	}

	public void setBadCommentCount(Integer badCommentCount) {
		this.badCommentCount = badCommentCount;
	}

	public Integer getAllCommentCount() {
		return allCommentCount;
	}

	public void setAllCommentCount(Integer allCommentCount) {
		this.allCommentCount = allCommentCount;
	}

	public List<MerchantCommentInfo> getList() {
		return list;
	}

	public void setList(List<MerchantCommentInfo> list) {
		this.list = list;
	}
	
	public GoodsCommentInfo(List<MerchantCommentInfo> list,List<Integer> countList) {
		if(countList == null || countList.size()!=2 || countList.get(0) < countList.get(1)) {
			new GoodsCommentInfo();
		}else {
			this.list = list;
			this.allCommentCount = countList.get(0);
			this.goodCommentCount = countList.get(1);
			this.badCommentCount = allCommentCount - goodCommentCount;
		}
	}
	
	public GoodsCommentInfo() {}
	
}

